#ifndef PROFILEWIDGET_H
#define PROFILEWIDGET_H

#include <QWidget>

class ProfileWidget : public QWidget
{
	Q_OBJECT
public:
	explicit ProfileWidget(QWidget *parent = 0);

protected:
	void paintEvent(QPaintEvent *event);
	void mouseMoveEvent(QMouseEvent *event);
	void leaveEvent(QEvent *event);

public slots:
	void SlotClear();
	void SlotProfileData(const QList<int> &listProfile);

private:
	void calcMinMax();
	void drawProfile(QPainter &painter, QRectF rect);

private:
	QList<int> m_data;
	int m_iValueMin;
	int m_iValueMax;
	int m_iRangeMin;
	int m_iRangeMax;
	QPoint m_ptMouse;
};

#endif // PROFILEWIDGET_H
